<html>
<head>
    <meta http-equiv="content-type" content="text/html;charset=utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1"/> 
    <title>{$title} - <tp:sitename /></title>
 <style>
 body{ background:#f5f5f5;}
 .wx_img{ margin-top:30px;}
 .wx_img img{ border:1px solid #ddd;}
 </style>   
</head>
<body>
	<div align="center" >
	<h1 style="color:red;"><tp:sitename />-微信扫码支付</h1>
	<img src="__PUBLIC__/images/WePayLogo.png" width="180px;" style="display:block; margin:0px auto; margin-top:100px;">
    <div class="wx_img"><img alt="微信扫码支付" src="{:U('Pay/qrcode?data='.$codeurl)}" /></div>
	 <input type="hidden" value="{$order_no}" id="check_order_statue"/>
	</div>
	<style>
	button{
	background-color: #7fbf4d;
    background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #7fbf4d), color-stop(100%, #63a62f));
    background-image: -webkit-linear-gradient(top, #7fbf4d, #63a62f);
    background-image: -moz-linear-gradient(top, #7fbf4d, #63a62f);
    background-image: -ms-linear-gradient(top, #7fbf4d, #63a62f);
    background-image: -o-linear-gradient(top, #7fbf4d, #63a62f);
    background-image: linear-gradient(top, #7fbf4d, #63a62f);
    border: 1px solid #63a62f;
    border-bottom: 1px solid #5b992b;
    border-radius: 3px;
    -webkit-box-shadow: inset 0 1px 0 0 #96ca6d;
    box-shadow: inset 0 1px 0 0 #96ca6d;
    color: #fff;
    font: bold 11px/1 "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif;
    padding: 7px 0 8px 0;
    text-align: center;
    text-shadow: 0 -1px 0 #4c9021;
    width: 150px;
	}
	</style>
</body>
</html>
<script src="__PUBLIC__/js/jquery.js"></script>
<script>
changeOrderStatues();
function changeOrderStatues(){
	var outTradeNo =$("#check_order_statue").val();
	if (outTradeNo != 0 && outTradeNo != null) {
		$.ajax({
			url: "{:U('Pay/wxcheck')}?tradeno=" + outTradeNo,
			type: "GET",
			dataType:"json",
			data: "",
			success: function (data){
				if (data==1) {
					//订单状态为1表示支付成功
					alert("感谢您赞助，付款成功");
					parent.location.href = "{:U('Member/order')}"; //页面跳转
				}},
			error: function (){
				alert("请求订单状态出错"); }
		});
	}

	setTimeout("changeOrderStatues()", 3000);
}
</script>